<?php

namespace App\Http\Resources\V1;

use Illuminate\Http\Resources\Json\JsonResource;

class OrderResource extends JsonResource
{
    public function toArray($request)
    {
        return [
            'id'    => $this->id,
            'no'    => $this->no,
            'address'   => data_get($this->address, 'address', ''),
            'message'   => $this->message,
            'created_at'=> $this->created_at->toDateTimeString(),
            'status'    => $this->status,
        ];
    }
}
